import request from "../request/index";

const baseUrl = process.env.VUE_APP_BASE_URL;

export function QueryClient(name, pageIndex, pageSize) {
  return request.post(
    `${baseUrl}/Client/QueryClient`,
    {
      name: name,
    },
    {
      pageIndex: pageIndex,
      pageSize: pageSize,
    }
  );
}
export function GetClient(id) {
  return request.get(`${baseUrl}/Client/GetClient?id=${id}`);
}

export function UpdateClient(Client) {
  return request.post(`${baseUrl}/Client/UpdateClient`, Client);
}

export function AddClient(Client) {
  return request.post(`${baseUrl}/Client/AddClient`, Client);
}

export function DeleteClient(Client) {
  return request.post(`${baseUrl}/Client/DeleteClient`, Client);
}
